﻿<%@ Page Language="C#" MasterPageFile="~/GUIMaster.Master" AutoEventWireup="true" CodeBehind="userSearch.aspx.cs"
    Inherits="GUI.userSearch" meta:resourcekey="Page" Culture="Auto" UICulture="Auto" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHomePage" runat="server">
   
    <h1>
        <asp:Label ID="Label1" runat="server" meta:resourcekey="lblTitle1"></asp:Label>
    </h1>

        <div id="Search">
        
        
          <div id="Result">
            <asp:Panel ID="content" Visible="false" runat="server">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                <div id="header_content_result_users"></div>
                <div id="line_content_result_users">
                    
                 <asp:UpdateProgress ID="UpdateProgress1" runat="server">
                    <ProgressTemplate>
                    <div id="loader_friends">
                        <img alt="Loading please wait" src="../master/resourcesNew/img/loader.gif" />
                           <asp:Label ID="lbl_loader" runat="server" CssClass="lbl_strong" meta:resourcekey="lbl_loader"></asp:Label></div>
                 </ProgressTemplate>
                    
                </asp:UpdateProgress>
                    <asp:GridView ID="gv_result" DataKeyNames="UserName, Smoker, Gender" AllowPaging="true"  Width="400px" AllowSorting="true" runat="server"
                        BorderStyle="None" GridLines="None" OnSelectedIndexChanging="Index_changing" AutoGenerateColumns="false" OnPageIndexChanging="PageChanged">
                        <PagerSettings Mode="Numeric" />
                        <PagerStyle HorizontalAlign="Center" />
                        <EmptyDataTemplate><asp:Label ID="lbl_noresult" runat="server" CssClass="lbl_strong" meta:resourcekey="lbl_NoResult"></asp:Label></EmptyDataTemplate>
                        
                        <Columns>
                            <asp:TemplateField>
                                <ItemStyle CssClass="contentCreatedTripTable" Width="27px"></ItemStyle>
                                <ItemTemplate>
                                <asp:Image ID="igmUser" runat="server" ImageUrl='<%# "master/resourcesNew/img/" + Get_Gender(""+Eval("Gender")) + ".png" %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                                                    
                            <asp:TemplateField HeaderText="NickName" HeaderStyle-CssClass="headerCreatedTripTable" meta:resourcekey="lblDep"
                                >
                                <ItemTemplate>
                                    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "" + getUrlProfile(""+Eval("UserName")) %>'> <%# Eval("UserName")%> </asp:HyperLink>
                                </ItemTemplate>
                            </asp:TemplateField>
                                                        
                            <asp:BoundField DataField="Age" HeaderStyle-CssClass="headerCreatedTripTable" ItemStyle-CssClass="contentCreatedTripTable"
                                 SortExpression="Age" ItemStyle-Width="30px" meta:resourcekey="lblAgeResult" >
                                <HeaderStyle CssClass="headerCreatedTripTable"></HeaderStyle>
                                <ItemStyle CssClass="contentCreatedTripTable"></ItemStyle>
                            </asp:BoundField>
                            
                            <asp:TemplateField>
                                <ItemStyle CssClass="contentCreatedTripTable" Width="27px"></ItemStyle>
                                <ItemTemplate>
                                <asp:Image ID="igmUser" runat="server" ImageUrl='<%# "master/resourcesNew/img/" + Get_Smoker(""+Eval("Smoker")) + ".png" %>' />
                                </ItemTemplate>
                            </asp:TemplateField>                            
                          
                          
                        </Columns>
                    </asp:GridView>
                    </div>
                    <div id="footer_content_result_users"></div>
                    
                </ContentTemplate>
            </asp:UpdatePanel>
                 </asp:Panel>
        </div>
        
        <asp:Panel ID="PanelSearch" runat="server" DefaultButton="btnSearch">
        <div id="form_search">
            <asp:Table runat="server" Width="600px">
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Label ID="lblUserNick" runat="server" CssClass="lbl_strong" meta:resourcekey="lblUserNick"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:TextBox ID="txtUserNick" runat="server" meta:resourcekey="txtUserNick" CssClass="txtBox_generics"></asp:TextBox>
                    </asp:TableCell>
                </asp:TableRow>
                
                
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Label ID="lblGender" runat="server" CssClass="lbl_strong" meta:resourcekey="lblGender"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:RadioButtonList ID="rblGender" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem meta:resourcekey="M"></asp:ListItem>
                            <asp:ListItem meta:resourcekey="F"></asp:ListItem>
                            <asp:ListItem Selected="True" meta:resourcekey="U"></asp:ListItem>
                        </asp:RadioButtonList>  
                    </asp:TableCell>
                </asp:TableRow>
                               
                      
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Label ID="lblSmoker" runat="server" CssClass="lbl_strong" meta:resourcekey="lblSmoker"></asp:Label>
                    </asp:TableCell>
                    <asp:TableCell>
                        <asp:RadioButtonList ID="rblSmoker" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem meta:resourcekey="sm"></asp:ListItem>
                            <asp:ListItem meta:resourcekey="no_sm"></asp:ListItem>
                            <asp:ListItem Selected="True" meta:resourcekey="boh_sm"></asp:ListItem>
                        </asp:RadioButtonList>      
                    </asp:TableCell>
                </asp:TableRow>
                
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Button ID="btnSearch" runat="server" meta:resourcekey="btnSearch"  CssClass="button_generics" onclick="btnSearch_Click"/>
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
            
            
            
            </div>
        </asp:Panel>   
         
        </div>

</asp:Content>
